using System;
using System.Reflection;
using System.IO;
using System.Drawing;
namespace CUtil
{
	/// <summary>
	/// Summary description for ImageGetter.
	/// </summary>
	public class ImageGetter
	{
		public ImageGetter()
		{
			//
			// TODO: Add constructor logic here
			//
		}
		public static Bitmap GetBitmap(Assembly assembly, string imageName)
		{
			Stream	imageStream =  assembly.GetManifestResourceStream(imageName) ;
			Bitmap b = null;
			if(imageStream != null)
			{
				System.Drawing.Image theImage = System.Drawing.Image.FromStream ( imageStream ) ;
				b = theImage as Bitmap;
			}
			

			return b;
		
		}
	}
}
